package com.teichmann.engine;

import java.io.IOException;
import java.util.Date;

import com.teichmann.core.OnlinePage;

public class OnlineExecutor implements Runnable {

	private OnlinePage[] pages = new OnlinePage[] { 
			new com.teichmann.core.targets.online.SulRevendas()
	};
	private String parameter;

	
	public OnlineExecutor(String parameter) {
		this.parameter = parameter;
	}

	public void run() {
		try {
			System.out.println("Start  : "+ new Date(System.currentTimeMillis()));
			new CarSearch(pages).process(parameter);
			System.out.println("Finish : "+new Date(System.currentTimeMillis()));
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	public static void main(String args[]) {
		(new Thread(new OnlineExecutor("astra"))).start();
	}

}
